package com.guo;

import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication
@ComponentScan(basePackages = {"com.guo"})
public class ExcelBatchApplication {

    public static void main(String[] args) {
        SpringApplication.run(ExcelBatchApplication.class, args);
    }

    @Bean
    public static BeanFactoryPostProcessor removeTomcatWebServerCustomizer(){
        return (beanFactory) ->
                ((DefaultListableBeanFactory)beanFactory).removeBeanDefinition("tomcatWebServerFactoryCustomizer");
    }

}
